/*
 * UserInterface.hpp
 *
 *  Created on: Jan 18, 2015
 *      Author: toti
 */

#ifndef USERINTERFACE_HPP_
#define USERINTERFACE_HPP_

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

#include <iostream>
#include <string>
#include <fstream>
#include <regex>
#include <list>

#include <Network/LocalClient.hpp>
#include <Network/MessagePackages/ClientMessagePackage.hpp>
#include <Misc/Config.hpp>
#include <Misc/ThreadSafeList.hpp>

class UserInterface: public LocalClient {

private:

	std::ofstream *ofs;

	int inputFileDescriptor;


public:



	UserInterface();

	void handleInputData(std::list<MessagePackage*> *messageList);
	void handleOutputData(MessagePackage *messagePackage);

	MessagePackage *buildPackage(std::string& input);

	void pushOutboundMessagePackageList(ClientMessagePackage *clientMessagePackage);
	MessagePackage *popInboundMessagePackageList();

	int getInputFileDescriptor();
};



#endif /* USERINTERFACE_HPP_ */
